import {LOGIN,LOGOUT} from '../actionType'
const initValue = {
    token: ''
  }
  export default function login(state = initValue, action) {
      switch (action.type) {
          case LOGIN:
              return {...state,token:'Bearer ' + action.payload}
          case LOGOUT:
              return {...state,token:''}
          default:
            return state
      }
    
  }